package com.bazaaroid.server.gae.business.facade.impl;

import com.bazaaroid.server.gae.business.facade.ImportFacade;
import com.bazaaroid.server.gae.core.dao.partner.CategoryDAO;
import com.bazaaroid.server.gae.core.dao.partner.DiscountDAO;
import com.bazaaroid.server.gae.core.dao.partner.LocationDAO;
import com.bazaaroid.server.gae.core.dao.partner.PartnerDAO;
import com.bazaaroid.server.gae.core.dao.partner.ProductDAO;
import com.bazaaroid.server.gae.core.ioc.GuiceFactory;

public class ImportFacadeImpl implements ImportFacade{

	@Override
	public void importCategories(String filePath) {
		CategoryDAO categoryDAO = GuiceFactory.getInjector().getInstance(CategoryDAO.class);
		categoryDAO.importCategoriesFromFile(filePath);
	}

	@Override
	public void importPartners(String filePath) {
		PartnerDAO partnerDAO = GuiceFactory.getInjector().getInstance(PartnerDAO.class);
		partnerDAO.importPartnersFromFile(filePath);
	}

	@Override
	public void importLocations(String filePath) {
		LocationDAO locationDAO = GuiceFactory.getInjector().getInstance(LocationDAO.class);
		locationDAO.importLocationsFromFile(filePath);
	}

	@Override
	public void importProducts(String filePath) {
		ProductDAO productDAO = GuiceFactory.getInjector().getInstance(ProductDAO.class);
		productDAO.importProductsFromFile(filePath);
	}

	@Override
	public void importDiscounts(String filePath) {
		DiscountDAO discountDAO = GuiceFactory.getInjector().getInstance(DiscountDAO.class);
		discountDAO.importDiscountsFromFile(filePath);
	}

}
